package com.an;

public class Anon {
    public static void main(String[] args) {
        Outer_ outer_ = new Outer_();
        outer_.f();
    }
}

interface IA{
    public void cry();
}

class Outer_{
    private int age;

    //匿名内部类
//    public void f(){
//        IA tegier = new IA{
//            public void cry(){
//                System.out.println("老虎叫");
//            }
//        }
//    }
    public void f(){
        IA tiger=new IA(){
            @Override
            public void cry() {
                System.out.println("老虎叫....");
            }

        };
        tiger.cry();
    }


}